Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docathon][Add CN Doc No.30、31] #6447

Merged
merged 9 commits into from
Feb 20, 2024
Merged

[Docathon][Add CN Doc No.30、31] #6447

merged 9 commits into from
Feb 20, 2024

Conversation

Kaedeharai
Copy link
Contributor

PR types

Others

PR changes

Docs

Description

补充缺失的中文api文档 :
#6193

添加中文文档:
paddle.incubate.nn.functional.fused_rotary_position_embedding
paddle.sparse.nn.functional.subm_conv2d

英文文档链接:
https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/incubate/nn/functional/fused_rotary_position_embedding_en.html
https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/sparse/nn/functional/subm_conv2d_en.html

@sunzhongkai588 @niuliling123

Copy link

paddle-bot bot commented Jan 4, 2024

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6447.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

参数
::::::::::

- **q** (Tensor) - 输入张量。 数据类型可以是 bfloat16, float16, float32 或 float64. q 的形状必须是 [batch_size, seq_len, num_heads, head_dim] 并且 head_dim 必须是 2 的倍数。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. float64. 标点符号需要改成中文符号。
  2. q 的形状必须是 [batch_size, seq_len, num_heads, head_dim] 并且 head_dim 必须是 2 的倍数。 -> q 的形状必须是 [batch_size, seq_len, num_heads, head_dim],并且 head_dim 必须是 2 的倍数。
  3. 下面的参数说明也存在相同问题

输入(Input)和输出(Output)是多维稀疏张量(SparseCooTensors), 其形状为 :math: `[N, H, W, C]` 。
其中 N 是批次大小, C 是通道数, H 是特征的高度, W 是特征的宽度。
如果提供了偏差归因,则将偏差添加到卷积的输出中。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一些名词描述上,可以参考下 https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/Conv2D_cn.html#conv2d文档,名词与其保持一致。例如:
滤波器 -> 卷积核
步幅 -> 步长(stride)


- x (Tensor): 输入是形状为 [N, H, W, C] 的四维稀疏张量, 输入数据类型为 float16、float32 或 float64。
- weight (Tensor): 形状为 [kH, kW, C/g, M] 的卷积核,
其中 M 是滤波器(输出通道)的数量, g 是组的数量, kD、kH、kW 分别是滤波器的高度和宽度。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

滤波器->卷积核

docs/api/paddle/sparse/nn/functional/subm_conv2d_cn.rst Outdated Show resolved Hide resolved
如果 dilation 是列表/元组,则它必须包含两个整数 (dilation_height、dilation_width)。否则, dilation_height = dilation_width = dilation。
dilation 的默认值为 1。
- groups (int, optional): 二维卷积层的组号。根据 Alex Krizhevsky 的 Deep CNN 论文中的卷积分组:
当 group=2 时,滤波器的前半部分仅连接到前半部分的输入通道,而滤波器的后半部分仅连接到输入通道的后半部分。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

滤波器-> 卷积核

Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意格式问题

docs/api/paddle/sparse/nn/functional/subm_conv2d_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/sparse/nn/functional/subm_conv2d_cn.rst Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整体可以参考 subm_conv2d,看看对应的英文翻译是否准确

Kaedeharai and others added 2 commits January 19, 2024 13:03
Co-authored-by: zachary sun <70642955+sunzhongkai588@users.noreply.github.com>
Co-authored-by: zachary sun <70642955+sunzhongkai588@users.noreply.github.com>
@luotao1 luotao1 merged commit fafea03 into PaddlePaddle:develop Feb 20, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants